<?php
/**
 * 定义h:tabset控件
 * 
 * <h:tabset selected.style="font-weight:bold">
 * 	<h:tab action="a" cond.action="a">Action A</h:tab>
 * 	<h:tab action="b" cond.action="b">Action B</h:tab>
 * 	<h:tab action="c" cond.action="c">Action C</h:tab>
 * </h:tabset>
 * 
 * 支持的参数有：
 * - selected.* <array> 选中的标签的附加属性
 * - default (TBD)
 * - layout.tag <string> 布局标签(可选的有ul,dl)
 * - tab.tag - <string> TAB使用的标签，v1.1.2加入
 *
 * @package if
 * @subpackage module.ui
 * @since 1.1.0
 */
class UITabset extends UIControl {
	private $tag;
	protected $tpl = "html_tabset";
	
	function tag() {
		return $this->tag;
	}
	
	function _after_parse() {
		parent::_after_parse();
		
		$this->addReserveAttrs(array( "selected", "default", "layout", "tab" ));
		
		$layout = $this->attr("layout");
		if (is_array($layout) && isset($layout["tag"])) {
			$this->tag = $layout["tag"];
		}
		$this->addTplVar("tag", $this->tag);
	}
	
	function render() {
		return parent::render();
	}
}

?>